import { Injectable, OnModuleInit } from '@nestjs/common';

@Injectable()
export class UserService implements OnModuleInit {
  onModuleInit() {
    console.log('OnModuleInit');
  }
  onApplicationBootstrap() {
    console.log('onApplicationBootstrap');
  }
  onModuleDestroy() {
    console.log('onModuleDestroy');
  }
  beforeApplicationShutdown() {
    console.log('beforeApplicationShutdown');
  }
  async userList(): Promise<any[]> {
    return [
      {
        id: 0,
        name: '张三',
      },
      {
        id: 1,
        name: '李四',
      },
    ];
  }
}
